<template>
  <!-- 报废、调拨 -->
  <el-dialog :visible="visible" :title="title"
             top="auto"
             :modal="true"
             width="60%"
             height="800px"
             @close="vformDialog"
             
             append-to-body>

    <Detail :form="form" />

    <!-- 工作流中设计好的动态表单 -->
    <VformRenders v-if="visible"  @vformDialog="vformDialog" :formData="formData"
                  :definitionId="definitionId" :business-key="businessKey" :code="Code"
    ></VformRenders>
  </el-dialog>
</template>

<script>
import Detail from './Detail';
import Common from '@/utils/common'
export default {
  components: { Detail },
  mixins: [Common],
  data() {
    return {
      budget: null,
      formData: {},
      definitionId: null,
      businessKey: null,
      Code: 'CODE_ASSET',
      title: "",
      disable: true,
      visible: false,
      loading: false,
      isEdit: false,
      form: {},
    }
  },

  computed: {
    formRef() {
      return this.$refs.editForm
    }
  },
  methods: {
    vformDialog() {
      this.visible = false
    },
    show(info, formData, definitionId, title) {
      this.definitionId = definitionId;
      this.title = title;
      this.form = info;
      this.businessKey = info.id;
      this.formData = formData;
      this.visible = true
    },
    handleSubmit() {

    },
    handleCancel() {
      this.visible = false
      this.loading = false
    }
  }
}
</script>

<style lang="scss">
el-dialog {
  background: #ffffff;
  border: 1px solid #ffffff;
}

</style>
